package org.kmp.project.net.api

import io.ktor.client.call.body
import io.ktor.client.request.get
import kotlinx.serialization.Serializable
import org.kmp.project.net.createHttpClient



@Serializable
data class TestUserInfo(
    val id: Int,
    val title: String,
    val body: String
)

suspend fun getUserInfo(): TestUserInfo {
    val client = createHttpClient()
    return client.get("https://jsonplaceholder.typicode.com/posts/1").body<TestUserInfo>()
}
